<template>
	<view class="mainpadding" style="padding-bottom: 150rpx;">
		<view class="flexbetween">
			<view class="main_size bold hei_text">圖片</view>
			<view class="flexleft">
				<view class="positionr margin_right1" v-for="(item,index) in image_text" :key="index">
					<image class="listleftimg radius" :src="item" mode=""></image>
					<view class="deleteimg" @click="removeImg(image,image_text,index)"></view>
				</view>
				<image class="listleftimg radius" src="@/static/image/system/upimg.png" mode=""
					v-if="image_text.length<1" @click="uploadImg(image,image_text,1)"></image>
			</view>
		</view>
		<view class="flexbetween margin_top">
			<view class="main_size bold hei_text">商品詳情</view>
			<view class="flexleft">
				<view class="positionr margin_right1" v-for="(item,index) in images_text" :key="index">
					<image class="listleftimg radius" :src="item" mode=""></image>
					<view class="deleteimg" @click="removeImg(images,images_text,index)"></view>
				</view>
				<image class="listleftimg radius" src="@/static/image/system/upimg.png" mode=""
					v-if="images_text.length<3" @click="uploadImg(images,images_text,3)"></image>
			</view>
		</view>
		<view class="flexleft">
			<view class="main_size margin_top bold hei_text" style="width: 33.33%;">價格</view>
			<view class="main_size margin_right margin_top bold hei_text" style="width: 33.33%;">原價</view>
			<view class="main_size margin_top bold hei_text" style="width: 33.33%;">售價</view>
		</view>
		<view class="flexleft margin_top2">
			<view class="main_size bold hei_text" style="width: 33.33%;">周一</view>
			<view class="radius flexleft margin_right" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hong_text margin_right1">$</view>
				<input class="main_size bold hong_text" style="width: 200rpx;" type="number"
					placeholder="請輸入原價" v-model="monday_hxprice">
			</view>
			<view class="radius flexleft" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hei_text margin_right1">$</view>
				<input class="main_size bold hei_text" style="width: 200rpx;" type="number"
					placeholder="請輸入售價" v-model="monday_price">
			</view>
		</view>
		<view class="flexleft margin_top2">
			<view class="main_size bold hei_text" style="width: 33.33%;">周二</view>
			<view class="radius flexleft margin_right" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hong_text margin_right1">$</view>
				<input class="main_size bold hong_text" style="width: 200rpx;" type="number"
					placeholder="請輸入原價" v-model="tuesday_hxprice">
			</view>
			<view class="radius flexleft" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hei_text margin_right1">$</view>
				<input class="main_size bold hei_text" style="width: 200rpx;" type="number"
					placeholder="請輸入售價" v-model="tuesday_price">
			</view>
		</view>
		<view class="flexleft margin_top2">
			<view class="main_size bold hei_text" style="width: 33.33%;">周三</view>
			<view class="radius flexleft margin_right" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hong_text margin_right1">$</view>
				<input class="main_size bold hong_text" style="width: 200rpx;" type="number"
					placeholder="請輸入原價" v-model="wednesday_hxprice">
			</view>
			<view class="radius flexleft" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hei_text margin_right1">$</view>
				<input class="main_size bold hei_text" style="width: 200rpx;" type="number"
					placeholder="請輸入售價" v-model="wednesday_price">
			</view>
		</view>
		<view class="flexleft margin_top2">
			<view class="main_size bold hei_text" style="width: 33.33%;">周四</view>
			<view class="radius flexleft margin_right" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hong_text margin_right1">$</view>
				<input class="main_size bold hong_text" style="width: 200rpx;" type="number"
					placeholder="請輸入原價" v-model="thursday_hxprice">
			</view>
			<view class="radius flexleft" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hei_text margin_right1">$</view>
				<input class="main_size bold hei_text" style="width: 200rpx;" type="number"
					placeholder="請輸入售價" v-model="thursday_price">
			</view>
		</view>
		<view class="flexleft margin_top2">
			<view class="main_size bold hei_text" style="width: 33.33%;">周五</view>
			<view class="radius flexleft margin_right" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hong_text margin_right1">$</view>
				<input class="main_size bold hong_text" style="width: 200rpx;" type="number"
					placeholder="請輸入原價" v-model="friday_hxprice">
			</view>
			<view class="radius flexleft" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hei_text margin_right1">$</view>
				<input class="main_size bold hei_text" style="width: 200rpx;" type="number"
					placeholder="請輸入售價" v-model="friday_price">
			</view>
		</view>
		<view class="flexleft margin_top2">
			<view class="main_size bold hei_text" style="width: 33.33%;">周六</view>
			<view class="radius flexleft margin_right" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hong_text margin_right1">$</view>
				<input class="main_size bold hong_text" style="width: 200rpx;" type="number"
					placeholder="請輸入原價" v-model="saturday_hxprice">
			</view>
			<view class="radius flexleft" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hei_text margin_right1">$</view>
				<input class="main_size bold hei_text" style="width: 200rpx;" type="number"
					placeholder="請輸入售價" v-model="saturday_price">
			</view>
		</view>
		<view class="flexleft margin_top2">
			<view class="main_size bold hei_text" style="width: 33.33%;">周日</view>
			<view class="radius flexleft margin_right" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hong_text margin_right1">$</view>
				<input class="main_size bold hong_text" style="width: 200rpx;" type="number"
					placeholder="請輸入原價" v-model="sunday_hxprice">
			</view>
			<view class="radius flexleft" style="width: 33.33%;border: 1rpx solid #ffa126;padding: 8rpx 10rpx;box-sizing: border-box;">
				<view class="main_size bold hei_text margin_right1">$</view>
				<input class="main_size bold hei_text" style="width: 200rpx;" type="number"
					placeholder="請輸入售價" v-model="sunday_price">
			</view>
		</view>
		<view class="flexbetween margin_top">
			<view class="main_size bold hei_text">使用有效時</view>
			<input class="main_size bold hei_text textright" type="number" placeholder="請輸入時間(分鐘)"
				v-model="endtime">
		</view>
		<view class="flexbetween margin_top">
			<view class="main_size bold hei_text">點餐有效時</view>
			<input class="main_size bold hei_text textright" style="width: 70%;" type="text"
				placeholder="請输入點餐有效時間(分鐘)" v-model="dctime">
		</view>
		<view class="flexbetween margin_top">
			<view class="main_size bold hei_text">結算時間</view>
			<view class="flexleft" @click="showst=true">
				<input class="main_size bold hei_text textright" type="text" disabled placeholder="請選擇日期"
					v-model="andtime">
				<u-icon name="arrow-right" color="#333" size="14"></u-icon>
			</view>
		</view>
		<view class="flexbetween margin_top">
			<view class="main_size bold hei_text">使用人數</view>
			<input class="main_size bold hei_text textright" type="number" placeholder="請輸入人數" v-model="count">
		</view>
		<view class="flexbetween margin_top">
			<view class="main_size bold hei_text">享受折扣</view>
			<input class="main_size bold hei_text textright" type="number" placeholder="請輸入"
				v-model="sharezk">
		</view>
		<view class="flexbetween margin_top">
			<view class="main_size bold hei_text">設施與服務</view>
			<view class="flexright">
				<input type="text" placeholder="請輸入" v-model="sscontent" @confirm="ssConfirm"
					class="textright margin_right2" />
				<view class="addimg" @click="ssConfirm"></view>
			</view>
		</view>
		<view class="flexleft flex_wrap">
			<view class="margin_top2 margin_right2" v-for="(value,i) in ssArr" :key="i">
				<view class="itemtime">
					<view class="">{{value}}</view>
					<view class="posidel" @click="removess(index,i)">
						<u-icon name="close" color="#fff" size="8"></u-icon>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				image_text: [],
				image: [],
				images_text: [],
				images: [],
				monday_price: "",
				tuesday_price: "",
				wednesday_price: "",
				thursday_price: "",
				friday_price: "",
				saturday_price: "",
				sunday_price: "",
				monday_hxprice: "",
				tuesday_hxprice: "",
				wednesday_hxprice: "",
				thursday_hxprice: "",
				friday_hxprice: "",
				saturday_hxprice: "",
				sunday_hxprice: "",
				lc: "",
				lc_id: "",
				ssArr: [],
				sscontent: "",
				sharezk: "",
			}
		},
		methods: {
			ssConfirm() {
				if (this.sscontent == "") return
				this.ssArr.push(this.sscontent)
				this.sscontent = ""
			},
			removess(index, i) {
				this.ssArr.splice(i, 1)
			},
			removeImg(arr, arr_text, index) {
				arr.splice(index, 1)
				arr_text.splice(index, 1)
			},
		}
	}
</script>

<style lang="scss" scoped>
	.picker-view {
		width: 550rpx;
		height: 600rpx;
		margin-top: 20rpx;
	}

	.item {
		line-height: 100rpx;
		text-align: center;
	}

	.ewm {
		margin-top: 50rpx;
		width: 300rpx;
		height: 300rpx;
	}

	.ewmtop {
		width: 700rpx;
		height: 280rpx;
	}

	.itemtime {
		padding: 30rpx 20rpx;
		box-sizing: border-box;
		border-radius: 10rpx;
		position: relative;
		background-color: #ffefe7;
		color: #fa5f00;
		font-size: 24rpx
	}

	.posidel {
		position: absolute;
		top: 0;
		right: 0;
		padding: 10rpx 12rpx;
		background-color: #fa5f00;
		border-radius: 0 6px 0 10rpx;
	}
</style>
